<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="partnerForm.title"/></title>
    <meta name="heading" content="<fmt:message key='partnerForm.heading'/>"/>
    <meta name="menu" content="partnerFormMenu"/>
    <script type="text/javascript" src="<c:url value='/scripts/jquery/ui/jquery.ui.button.js'/>"></script>
    <script type="text/javascript" src="<c:url value='/scripts/jquery/ui/jquery.ui.datepicker.js'/>"></script>
    <style>
		#toolbar {
			padding: 10px 10px;
		}
		#toolbar2 {
			padding: 10px 10px;
		}
		#vesselName,#vesselCode,#vesselAge,#vesselWeight,#vesselCountry,#vesselDescription{
			height: 20px;
			margin-right: 20px;
			margin-top: 12px;
		}
		
	</style>
</head>


<div class="buttons" style="float:left;padding-right:15px;margin-top: 20px;">
<form:form commandName="partner" method="post" action="partnerForm.html" onsubmit="return onFormSubmit(this)" id="partnerForm">
	<form:hidden path="id"/>
	<fieldset class="ui-widget ui-widget-content" style="width: 100%;margin-top: 12px; margin-bottom: 12px;">
		<legend class="ui-widget-header ui-corner-all">
			<fmt:message key="partnerForm.heading" />
		</legend>
    	<table>
			<tr>
				<td><appfuse:label styleClass="desc" key="partnerData.city"/></td>
        <td>
        <form:errors path="city" cssClass="fieldError"/>
        <form:select path="city" items="${cityList}" itemLabel="name" itemValue="id" class="select ui-widget-content ui-corner-all"  />
   </td>
   </tr>
   <tr>
   <td>
        <appfuse:label styleClass="desc" key="partnerData.type"/>
        </td>
        <td>
        <form:errors path="type" cssClass="fieldError"/>
        <form:input path="type" id="partnerType" class="ui-widget-content ui-corner-all"  cssErrorClass="text large error"/>
   </td>
   </tr>
   <tr>
   <td>
        <appfuse:label styleClass="desc" key="partnerData.code"/>
        </td>
        <td>
        <form:errors path="code" cssClass="fieldError"/>
        <form:input path="code" id="partnerCode"class="ui-widget-content ui-corner-all"  cssErrorClass="text large error"/>
   </td>
   </tr>
   <tr>
   <td>
        <appfuse:label styleClass="desc" key="partnerData.name"/>
        </td>
        <td>
        <form:errors path="name" cssClass="fieldError"/>
        <form:input path="name" id="partnerName"class="ui-widget-content ui-corner-all"  cssErrorClass="text large error"/>
  </td>
  </tr>
  <tr>
  <td>
        <appfuse:label styleClass="desc" key="partnerData.address"/>
        </td>
        <td>
        <form:errors path="address" cssClass="fieldError"/>
        <form:input path="address" id="partnerAddress"class="ui-widget-content ui-corner-all"  cssErrorClass="text large error"/>
   </td>
   </tr>
   <tr>
   <td>
        <appfuse:label styleClass="desc" key="partnerData.telephone"/>
        </td>
        <td>
        <form:errors path="telephone" cssClass="fieldError"/>
        <form:input path="telephone" id="partnerTelephone"class="ui-widget-content ui-corner-all"  cssErrorClass="text large error"/>
    </td>
     </tr>
     <tr>
     <td>
        <appfuse:label styleClass="desc" key="partnerData.fax"/>
        </td>
        <td>
        <form:errors path="fax" cssClass="fieldError"/>
        <form:input path="fax" id="partnerFax"class="ui-widget-content ui-corner-all"  cssErrorClass="text large error"/>
    </td>
    </tr>
    <tr>
    <td>
        <appfuse:label styleClass="desc" key="partnerData.email"/>
        </td>
        <td>
        <form:errors path="email" cssClass="fieldError"/>
        <form:input path="email" id="partnerNameEmail"class="ui-widget-content ui-corner-all"  cssErrorClass="text large error"/>
    </td>
    </tr>
    <tr>
    <td>
        <appfuse:label styleClass="desc" key="partnerData.contacter"/>
        </td>
        <td>
        <form:errors path="contacter" cssClass="fieldError"/>
        <form:input path="contacter" id="partnerContacter"class="ui-widget-content ui-corner-all"  cssErrorClass="text large error"/>
   </td>
   </tr>
   <tr>
   <td valign="top"">
        <appfuse:label styleClass="desc" key="partnerData.description"/>
        </td>
        <td>        
        <form:errors path="description" cssClass="fieldError"/>
        <form:textarea path="description" id="partnerDescription"class="ui-widget-content ui-corner-all"  cssErrorClass="text large error"/>
    </td>
    </tr>
    </table>
    <span id="toolbar">
	<button type="submit" id="add_maven2" class="button" name="save" onclick="bCancel=false">
		<fmt:message key="button.save"/>
	</button>

	<c:if test="${param.from == 'list' and param.method != 'Add'}">
		<button type="submit" id="delete_maven2" class="button" name="delete" onclick="bCancel=true;return confirmDelete('Partner Data')">
	         <fmt:message key="button.delete"/>
		</button>
	</c:if>

    <button type="submit" id="cancel_maven2" class="button" name="cancel" onclick="bCancel=true" value="<fmt:message key="button.cancel"/>"/>
    <fmt:message key="button.cancel"/>
	</button>
</span>
    </fieldset>
    
  
</form:form>
</div>
<script type="text/javascript">
	$("#add_maven" ).button({
	    icons: {
	        primary: "ui-icon-circle-plus"
	    }
	});
	
	$("#delete_maven" ).button({
	    icons: {
	        primary: "ui-icon-circle-minus"
	    }
	});
	
	$("#cancel_maven" ).button({
	    icons: {
	        primary: "ui-icon-circle-close"
	    }
	});
	
	$("#add_maven2" ).button({
	    icons: {
	        primary: "ui-icon-circle-plus"
	    }
	});
	
	$("#delete_maven2" ).button({
	    icons: {
	        primary: "ui-icon-circle-minus"
	    }
	});
	
	$("#cancel_maven2" ).button({
	    icons: {
	        primary: "ui-icon-circle-close"
	    }
	});
</script>